import Vue from "vue";
const state = Vue.observable({
    page: {
        index: 1,
        size: 10,
        sizes: [10, 30, 50, 100, 200, 500, 1000],
        layout: 'total, sizes, prev, pager, next, jumper'
    },
    token:{},
    Height:'99px',
    Width:'99px',
    rankList:[]


});
const actions = {
    setPage:( index, size, sizes, layout) => {
        state.page.index =index
        state.page.size = size
        state.page.sizes = sizes
        state.page.layout = layout
    },
    setToken:( obj) => {
        state.token = obj
    },
    setHeight:(hit) =>{
        state.Height = hit
    },
    setWidth:(wdh) => {
        state.Width = wdh
    },
    setRankList:(ralist) =>{
        state.rankList = ralist
    }
}
const store = {
    state,
    actions
};
export default store